layui.use(['layer','laydate','jquery'],function () {
    var layer = layui.layer;
    var laydate = layui.laydate;
    var $ = layui.jquery;

    refresh=function refresh(){
        location.reload();
    }

})
day();
function day(){
    var chartDom = document.getElementById('main');
    var myChart = echarts.init(chartDom);
    var option;

    option = {
        xAxis: {
            type: 'category',
            data: ['3:00', '6:00', '9:00', '12:00', '15:00', '18:00', '21:00']
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                data: [150, 230, 224, 218, 135, 147, 260],
                type: 'line'
            }
        ]
    };

    option && myChart.setOption(option);
}
function week() {
    var chartDom = document.getElementById('main');
    var myChart = echarts.init(chartDom);
    var option;

    option = {
        xAxis: {
            type: 'category',
            data: ['一', '二', '三', '四', '五', '六', '日']
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                data: [200, 170, 150, 190, 290, 130, 220],
                type: 'line'
            }
        ]
    };

    option && myChart.setOption(option);
}
function month(){
    var chartDom = document.getElementById('main');
    var myChart = echarts.init(chartDom);
    var option;

    option = {
        xAxis: {
            type: 'category',
            data: ['1~6', '7~12', '13~18', '19~24','25~29','30~31']
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                data: [200, 170, 150, 190, 290, 130],
                type: 'line'
            }
        ]
    };

    option && myChart.setOption(option);
}
